﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Autofac;

namespace HongStone.Common.Autofac_Config.cs
{
   public class Autofac_config:Autofac.Module
    {
        protected override void Load(ContainerBuilder builder)
        {
            var Iassembly = Assembly.Load("HongStone.Ince");
            var Aassembly_Dal = Assembly.Load("HongStone.Repository");
            var Aassembly_Bll = Assembly.Load("HongStone.Service");
            builder.RegisterAssemblyTypes(Aassembly_Dal, Iassembly).InstancePerLifetimeScope().AsImplementedInterfaces().AsSelf().PropertiesAutowired();
            builder.RegisterAssemblyTypes(Aassembly_Bll);

        }
    }
}
